package com.hjc.springbootmovies.service.Impl;

import com.hjc.springbootmovies.entity.ModelEmp;
import com.hjc.springbootmovies.mapper.MappingEmp;
import com.hjc.springbootmovies.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: HJC
 * Date: 2019/12/6
 * Time: 8:30
 * To change this template use File | Settings | File Templates.
 */
@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    private MappingEmp mappingEmp;
    @Override
    public List<ModelEmp> queryEmp() {
        return mappingEmp.queryEmp();
    }

    @Override
    public int addEmp(ModelEmp modelEmp) {
        return mappingEmp.addEmp(modelEmp);
    }

    @Override
    public int deleteById(int eid) {
        return mappingEmp.deleteById(eid);
    }

    @Override
    public int updateEmp(ModelEmp modelEmp) {
        return mappingEmp.updateEmp(modelEmp);
    }

    @Override
    public ModelEmp queryById(int eid) {
        return mappingEmp.queryById(eid);
    }
}
